﻿@{Layout = null;}
<html>
<head>
    <meta charset="utf-8">
    <title>jQuery File Upload Example</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js")></script>
    <script type="text/javascript" src="../../Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery.validate.min.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script type="text/javascript" src="../../Scripts/outerhtml.js"></script>

    <link rel="stylesheet" type="text/css" href="~/Content/site.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/Bootstrap/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/Bootstrap/bootstrap-responsive.min.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/Bootstrap/bootstrap-image-gallery.min.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/FileUpload/jquery.fileupload-ui.css" />
    @*<script type="text/javascript" src="~/Content/FileUpload/tmpl.min.js"></script>*@
    <script type="text/javascript" src="~/Content/FileUpload/canvas-to-blob.min.js"></script>
    <script type="text/javascript" src="~/Content/FileUpload/load-image.min.js"></script>
    <script type="text/javascript" src="~/Content/Bootstrap/bootstrap-image-gallery.min.js"></script>
    <script type="text/javascript" src="~/Content/Bootstrap/bootstrap.min.js"></script>
    <script type="text/javascript" src="~/Content/FileUpload/jquery.iframe-transport.js"></script>
    <script type="text/javascript" src="~/Content/FileUpload/jquery.fileupload.js"></script>
</head>
<body>
    <form id="fileupload" action="/Models/Upload/ComplaintUploadHandler.ashx" method="POST" enctype="multipart/form-data">
        <input type="file" id="fileDialog" name="files[]" multiple>
    <div class="btn btn-success fileinput-button">
        <i class="icon-plus icon-white"></i>
        <span>Add files...</span>
        
    </div>
        <input type="submit" value="Submit" />
    </form>
    <script>
        $(function () {
            $('#fileDialog').fileupload({
                url: "../Models/Upload/ComplaintUploadHandler.ashx",
                dataType: 'json',
                singleFileUploads: false,
                done: function (e, data) {
                    $.each(data.result, function (index, file) {
                        $('<p/>').text(file.name).appendTo(document.body);
                    });
                }
            });
        });
    </script>

</body>
</html>